<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<html>
<head>
<script type="text/javascript" src="<%=path%>/scripts/My97DatePicker/WdatePicker.js"></script>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>绩效考核系统</title>
<link href="styles/core.css" rel="stylesheet" type="text/css">
<link href="styles/Master.css" rel="stylesheet" type="text/css">

<script type="text/javascript" src="scripts/jquery/jquery.js"></script>
<script type="text/javascript" src="scripts/common.js"></script>

<script type="text/javascript" src="scripts/statistic/eva_result.js"></script>

<style>
.tabHeader1 {
	border-left: 1px solid #a2b8d0;
	border-top: 1px solid #a2b8d0;
}

.tabHeader1 td {
	height: 21px;
	border-right: 1px solid #a2b8d0;
	border-bottom: 1px solid #a2b8d0;
	color: #323230;
	padding-left: 1px;
	padding-right: 1px;
	word-wrap: break-word;
	word-break:break-all;
}
</style>

<script>
var path = '<%=path%>';
</script>

</head>

<body>

<form name="evaResultForm" method="post" onsubmit="return false;">

	<s:hidden name="resultId" id="resultId"></s:hidden>
	<s:hidden name="pagerEntity.pageInfo.pageNow" id="pageNow"></s:hidden>
	<h2 style="text-align: left">考核结果列表</h2>                                          
	
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td align="right" width="10%">
				考核类型：
			</td>
			<td align="left" width="15%">
				<s:select list="#{'1':'公共考核', '2':'岗位考核'}" headerKey="" headerValue="" cssStyle="width: 135px;"
					name="evaResultSearchEntity.type" id="type"></s:select>
			</td>
			<td align="right" width="10%">
				工作人员：
			</td>
			<td align="left" width="15%">
				<s:textfield id="workerName" name="evaResultSearchEntity.workerName" cssClass="input" readonly="true" cssStyle="width: 50%;"></s:textfield>
				<s:hidden id="workerCode" name="evaResultSearchEntity.workerCode"></s:hidden>
				<a href="javascript: void(0);" onclick="selectWorker(); return false;">
					<img src="images/f.gif" style="vertical-align: middle" border="0">选择&nbsp;&nbsp;
				</a>
			</td>
			<td align="right" width="10%">
				备注：
			</td>
			<td align="left" width="15%">
				<s:textfield name="evaResultSearchEntity.remark" cssClass="input" id="remark"></s:textfield>
			</td>
			<td align="right" width="25%" rowspan="2">
				<input type="image" src="<%=basePath%>images/search.jpg" onclick="search();"></input>
				<input type="image" src="<%=basePath%>images/excel.jpg" onclick="excel();"></input>
			</td>
		</tr>
		<tr>
			<td align="right" width="10%">
				考核日期：
			</td>
			<td align="left" width="15%">
				<s:textfield id="evaStartTime" name="evaResultSearchEntity.evaStartTime" cssClass="Wdate" onclick="WdatePicker({dateFmt: 'yyyy-MM-dd'})">
					<s:param name="value">
						<s:date name="evaResultSearchEntity.evaStartTime" format="yyyy-MM-dd"/>
					</s:param>
				</s:textfield>
			</td>
			<td align="center" width="10%">
				~
			</td>
			<td align="left" width="15%">
				<s:textfield id="evaEndTime" name="evaResultSearchEntity.evaEndTime" cssClass="Wdate" onclick="WdatePicker({dateFmt: 'yyyy-MM-dd'})">
					<s:param name="value">
						<s:date name="evaResultSearchEntity.evaEndTime" format="yyyy-MM-dd"/>
					</s:param>
				</s:textfield>
			</td>
			<td align="right" width="10%">
			</td>
			<td align="left" width="15%">
			</td>
		</tr>
	</table>

	<hr width="100%" align="left" size="1" color="#E1EEF8">

	<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabHeader1" id="dataInfo">
		<thead>
			<tr align="center" class="tdBg">
				<td style="text-align: center" nowrap="nowrap" width="7%">工作人员</td>
				<td style="text-align: center" nowrap="nowrap" width="10%">考核类型</td>
				<td style="text-align: center" nowrap="nowrap" width="10%">岗位名称</td>
				<td style="text-align: center" nowrap="nowrap" width="10%">考核项目名称</td>
				<td style="text-align: center" nowrap="nowrap" width="10%">考核规则名称</td>
				<td style="text-align: center" nowrap="nowrap" width="20%">考核时间</td>
				<td style="text-align: center" nowrap="nowrap" width="8%">分数</td>
				<td style="text-align: center" nowrap="nowrap" width="20%">备注</td>
				<td style="text-align: center" nowrap="nowrap" width="5%">操作</td>
			</tr>
		</thead>
		<tbody>
			<s:if test="#request.pagerEntity.resultList.size==0">
		   		<tr>
		   			<td colspan="10" align="center">
		   				对不起！没有搜索到结果......
		   			</td>
		   		</tr>
		   	</s:if>
		   	<s:else>

				<s:set id="total" value="0"></s:set>
			    <s:set id="totalSum" value="0"></s:set>

				<s:iterator value="pagerEntity.resultList" id="evaResult">
					<tr>
						<td>
							<s:property value="#evaResult.workerName"/>
						</td>
						<td align="center">
							<s:property value="#evaResult.typeName"/>
						</td>
						<td>
							<s:property value="#evaResult.jobName"/>
						</td>
						<td>
							<s:property value="#evaResult.itemName"/>
						</td>
						<td>
							<s:property value="#evaResult.ruleName"/>
						</td>
						<td>
							<s:date name="#evaResult.evaTime" format="yyyy-MM-dd HH:mm:ss"/>
						</td>
						<td>
							<s:property value="#evaResult.score"/>
						</td>
						<td style="height:100%;">
							<s:property value="#evaResult.remark" escape="false"/>
						</td>
						<td nowrap="nowrap" align="center">
							<!-- 
							<a href="javascript: void(0);" onclick="detail(<s:property value="#worker.workerCode"/>); return false;">
								<img src="images/detail.jpg" style="vertical-align: middle" border="0">详细
							</a>
							<a href="javascript: void(0);" onclick="modify(<s:property value="#worker.workerCode"/>); return false;">
								<img src="images/update.jpg" style="vertical-align: middle" border="0">修改
							</a>
							 -->
							<s:if test='#session._login_user_info.isAdmin'>
				    		<a href="javascript: void(0);" onclick="deleteEvaResult(<s:property value="#evaResult.resultId"/>); return false;">
								<img src="images/delete.jpg" style="vertical-align: middle" border="0">删除&nbsp;&nbsp;
							</a>
							</s:if>
						</td>
					</tr>
				</s:iterator>
				<tr class="tdBg">
					<td colspan="9" align="right">
						<s:include value="/pages/pagefooter.jsp"></s:include>
					</td>
				</tr>
			</s:else>
		</tbody>
	</table>

</form>

<div id="waiting" style="display: none;">
	<div id="background" class="background"></div>
	<div id="progressBar" class="progressBar">数据加载中，请稍等...</div>
</div>

<form name="downloadFrm" id="downloadFrm" action="statistic/evaResult-export.action" method="post" target="downloadiFrame">
	<input type="hidden" name="evaResultSearchEntity.type" id="download_type">
	<input type="hidden" name="evaResultSearchEntity.workerName" id="download_workerName">
	<input type="hidden" name="evaResultSearchEntity.remark" id="download_remark">
	<input type="hidden" name="evaResultSearchEntity.evaStartTime" id="download_evaStartTime">
	<input type="hidden" name="evaResultSearchEntity.evaEndTime" id="download_evaEndTime">
</form>
<iframe name="downloadiFrame" id="downloadiFrame" src="" style="display:none;visibility:hidden;height:0px;"/>
</body>
</html>